<template>
    <div class="xiaoguo">
        <my-header></my-header>
        <div class="nav">
            <ul>
                <li>
                    筛选
                    <i class="iconfont toggle icon-down"></i>
                </li>
                <li>
                    阶段
                    <i class="iconfont toggle icon-down"></i>
                </li>
                <li>
                    排序
                    <i class="iconfont toggle icon-down"></i>
                </li>
                <li style="color:#39c894;">
                    <i class="iconfont icon-search" style="font-size:25px;margin-left:20px;"></i>
                </li>
            </ul>
        </div>
       <ul class="list">
           <li v-for="(item,index) in list" :key="index" @click="zhiboDetail">
               <img :src="item.img" alt="">
               <div>
                <p>{{item.title}}</p>
                <p class="ps">{{item.now_stage}}工程</p>
               </div>
           </li>
       </ul>
       <div class="divs">
           <div class="d-one">1/8</div>
           <div class="d-two">下一页</div>
       </div>
        <my-buttom></my-buttom>
    </div>
</template>
<script>
import myHeader from "@/components/myHeader";
import myButtom from "@/components/Bottom.vue"
import axios from "axios";
export default {
  data() {
    return {
      list: []
    };
  },
  components: {
    myHeader,
    myButtom,
  },
  created() {
    axios.get("/api/home/zhibo").then(res => {
      console.log(res.data.data);
      this.list = res.data.data.list;
    });
  },
  methods:{
    zhiboDetail(){
      this.$router.push('/zhiboDetail')
    }
  }
};
</script>
<style lang="scss" scoped>
.nav{
  margin-top: 100px;
  width: 100%;
  height: 50px;
    ul{
        display: flex;
        li{
            margin: 0 20px;
        }
    }
}
.list {
    width: 100%;
  list-style: none;
  margin: 0;
  padding: 0;
  li {
      height: 130px;
    margin: 10px;
    background-color: #ffffff;
    display: flex;
    border-bottom: 1px solid #ccc;
    border-top: 1px solid #ccc;
    div{
        margin-left: 10px;
        padding-top: 10px;
    }
    .ps{
        background-color: #39c894;
        font-size: 14px;
        width: 70px;
        color: white;
        text-align: center;
        height: 25px;
        line-height: 25px;
        border-radius: 5px;
}
  }
  img {
    width: 167px;
    height: 112px;
    margin: 10px;
  }
}
.divs{
    display: flex;
    width: 95%;
    height: 50px;
    margin: 0 auto;
    div{
        width: 100%;
        // height: 50px;
        // flex: 1;
        text-align: center;
        line-height: 50px;
        border:1px solid #39c894;
        // height: 100%;
    }
    .d-one{
        background-color: #ffffff;
    }
    .d-two{
        background-color: #39c894;
        color: white;
    }
}
</style>
